const {Sequelize,Model} = require('sequelize');
const sequelize = require('../db/index');
class User extends Model{}

User.init({
  user_id:{
    type:Sequelize.INTEGER(11),
    autoIncrement:true,
    primaryKey:true
  },
  username:{
    type:Sequelize.STRING(50),
    unique:true,
    allowNull:false
  },
  password:{
    type:Sequelize.STRING(255),
    allowNull:false,
    
  },
  learnDay:{
    type:Sequelize.INTEGER(11),
    defaultValue:0,
  }
},{
  sequelize,
  tableName:'user'
});

module.exports = User;